package com.woniu.core.controller;

import com.woniu.aop.OperationLogAnnotation;
import com.woniu.core.entity.CoreFinanceAuditRecord;
import com.woniu.core.service.CoreFinanceAuditRecordService;
import com.woniu.util.utils.HttpResult;
import com.woniu.util.utils.RequestResult;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/CoreFinanceAuditRecord")
public class CoreFinanceAuditRecordController {
    @Autowired
    private CoreFinanceAuditRecordService coreFinanceAuditRecordService;

    /**
     * 新增核心企业审核融资企业记录
     * @param coreFinanceAuditRecordRequestResult 核心企业审核融资企业记录
     * @return
     */
    @PostMapping("/insertCoreFinanceAuditRecord")
    @OperationLogAnnotation(operModul = "核心企业-新增审核记录",operType = "新增",operDesc = "新增一个融资企业审核记录")//操作日志注解
    public HttpResult<?> insertCoreFinanceAuditRecord(RequestResult<CoreFinanceAuditRecord> coreFinanceAuditRecordRequestResult){
        return coreFinanceAuditRecordService.insertCoreFinanceAuditRecord(coreFinanceAuditRecordRequestResult);
    }


    /**
     * 修改核心企业审核融资企业记录
     * @param coreFinanceAuditRecordRequestResult 核心企业审核融资企业记录
     * @return
     */
    @PostMapping("/updateCoreFinanceAuditRecord")
    @OperationLogAnnotation(operModul = "核心企业-修改审核记录",operType = "修改",operDesc = "修改一个融资企业审核记录")//操作日志注解
    public HttpResult<?> updateCoreFinanceAuditRecord(RequestResult<CoreFinanceAuditRecord> coreFinanceAuditRecordRequestResult){
        return coreFinanceAuditRecordService.updateCoreFinanceAuditRecord(coreFinanceAuditRecordRequestResult);
    }

    /**
     * 删除核心企业审核融资企业记录
     * @param coreId 核心企业审核融资企业记录id
     * @return
     */
    @GetMapping("/deleteCoreFinanceAuditRecord")
    @OperationLogAnnotation(operModul = "核心企业-删除审核记录",operType = "删除",operDesc = "删除一个融资企业审核记录")//操作日志注解
    public HttpResult<?> deleteCoreFinanceAuditRecord(Integer coreId){
        return coreFinanceAuditRecordService.deleteCoreFinanceAuditRecord(coreId);
    }
}
